package com.zhanglu.authentication.mapper;

import com.zhanglu.authentication.common.ResultMapper;
import com.zhanglu.authentication.entity.AuthPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhanglu
 */
@Mapper
public interface AuthPermissionMapper extends ResultMapper<AuthPermission> {
    @Select("select role_name from auth_permission where server_name=#{serverName} and url=#{url} and method_type=#{methodType}")
    List<String> getRoleByServerNameAndUrlAndMethodType(@Param("serverName") String serverName, @Param("url") String url, @Param("methodType") String methodType);
}
